﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Web.UI;
using System.Data;

namespace QXBook.Controls.ServerControls
{
    public delegate void MonthChange(object sender, EventArgs e);
    /********************************************************
      Class DataCalendarItem
        - serves as the container for a single calendar entry,
          allowing for databinding syntax like the following
          to be used in the .aspx page:
         
            <%# Container.DataItem("MyField") %>            
     ********************************************************/
    [ToolboxItem(false)]
    public class DataCalendarItem : System.Web.UI.Control, INamingContainer
    {

        private DataRow _dataItem;

        public DataCalendarItem(DataRow dr)
        {
            _dataItem = dr;
        }

        // because the source data will be a DataTable
        // object, it makes sense for our DataItem
        // property to return a DataRow object
        // (i.e. a single item in the data source
        //  corresponds to a single row of data)
        public DataRow DataItem
        {
            get { return _dataItem; }
            set { _dataItem = value; }
        }
    }
}
